package com.chd.driversystem.domain;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;

import java.util.Date;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Index;
import org.greenrobot.greendao.annotation.NotNull;
import org.greenrobot.greendao.annotation.Unique;

/**
 * Created by shawnfly on 17-5-2.
 */
@Entity(indexes = {@Index(value = "id ASC",unique = true)})
public class DrivingRecord {
    @Id(autoincrement = true)
    private Long id;
    @NotNull
    private Long userId;
    @NotNull
    @Unique
    private Date createDate;//创建日期
    private Integer distance;//今日行驶距离
    private Integer tDistance;//月总行驶距离
    private Integer aveSpeed;//今日平均速度
    private Integer maxSpeed;//今日最大速度
    private Integer ttOverspeed;//今日总超速时长
    private Integer ttDriving;//今日总驾驶时间
    private Integer sfDriving;//今日单次疲劳驾驶次数
    private Integer cfDriving;//今日累计驾驶疲劳时间
    @Generated(hash = 1691737040)
    public DrivingRecord(Long id, @NotNull Long userId, @NotNull Date createDate,
            Integer distance, Integer tDistance, Integer aveSpeed, Integer maxSpeed,
            Integer ttOverspeed, Integer ttDriving, Integer sfDriving,
            Integer cfDriving) {
        this.id = id;
        this.userId = userId;
        this.createDate = createDate;
        this.distance = distance;
        this.tDistance = tDistance;
        this.aveSpeed = aveSpeed;
        this.maxSpeed = maxSpeed;
        this.ttOverspeed = ttOverspeed;
        this.ttDriving = ttDriving;
        this.sfDriving = sfDriving;
        this.cfDriving = cfDriving;
    }
    @Generated(hash = 1400993627)
    public DrivingRecord() {
    }
    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Long getUserId() {
        return this.userId;
    }
    public void setUserId(Long userId) {
        this.userId = userId;
    }
    public Date getCreateDate() {
        return this.createDate;
    }
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }
    public Integer getDistance() {
        return this.distance;
    }
    public void setDistance(Integer distance) {
        this.distance = distance;
    }
    public Integer getTDistance() {
        return this.tDistance;
    }
    public void setTDistance(Integer tDistance) {
        this.tDistance = tDistance;
    }
    public Integer getAveSpeed() {
        return this.aveSpeed;
    }
    public void setAveSpeed(Integer aveSpeed) {
        this.aveSpeed = aveSpeed;
    }
    public Integer getMaxSpeed() {
        return this.maxSpeed;
    }
    public void setMaxSpeed(Integer maxSpeed) {
        this.maxSpeed = maxSpeed;
    }
    public Integer getTtOverspeed() {
        return this.ttOverspeed;
    }
    public void setTtOverspeed(Integer ttOverspeed) {
        this.ttOverspeed = ttOverspeed;
    }
    public Integer getTtDriving() {
        return this.ttDriving;
    }
    public void setTtDriving(Integer ttDriving) {
        this.ttDriving = ttDriving;
    }
    public Integer getSfDriving() {
        return this.sfDriving;
    }
    public void setSfDriving(Integer sfDriving) {
        this.sfDriving = sfDriving;
    }
    public Integer getCfDriving() {
        return this.cfDriving;
    }
    public void setCfDriving(Integer cfDriving) {
        this.cfDriving = cfDriving;
    }

    @Override
    public String toString() {
        return "DrivingRecord{" +
                "id=" + id +
                ", userId=" + userId +
                ", createDate=" + createDate +
                ", distance=" + distance +
                ", tDistance=" + tDistance +
                ", aveSpeed=" + aveSpeed +
                ", maxSpeed=" + maxSpeed +
                ", ttOverspeed=" + ttOverspeed +
                ", ttDriving=" + ttDriving +
                ", sfDriving=" + sfDriving +
                ", cfDriving=" + cfDriving +
                '}';
    }
}
